require.config({
    baseUrl: '.',//模块默认加载路径
    paths: {//自定义模块加载路径

        "jquery": "/plugins/jquery/jquery-1.10.2",

        "bootstrap": "/plugins/bootstrap/js/bootstrap.min",

        "fast_click": "/plugins/fastclick/lib/fastclick",

        "admin_lte": "/frame/js/adminlte.min",
        "admin_lte_wolf": "/frame/adminlte-wolf",

        //"html5shiv":"https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min",
        "html5shiv": "/plugins/html5shiv.min",
        //"respond":"https://oss.maxcdn.com/respond/1.4.2/respond.min",
        "respond": "/plugins/respond.min",

        "datatables.net": "/plugins/datatables.net/media/js/jquery.dataTables",//命名一定为 datatables.net 否则会报找不到datatables.net.js 错误
        //datatables 表格
        "datatables": "/plugins/datatables.net/media/js/dataTables.bootstrap",
        //列宽调整
        "colresizable": "/plugins/datatables.net/extensions/colresizable/colResizable-1.6",
        //冻结表格列
        "fixed_columns": "/plugins/datatables.net/extensions/FixedColumns/js/dataTables.fixedColumns",
        //冻结表格表头
        "fixed_header": "/plugins/datatables.net/extensions/FixedHeader/js/dataTables.fixedHeader",
        //交换列位置
        "colReorder": "/plugins/datatables.net/extensions/ColReorder/js/dataTables.colReorder",
        //选择控件
        "select": "/plugins/datatables.net/extensions/Select/js/dataTables.select.min",
        <!---导出依赖-->
        "JSZip": "/plugins/JSZip-2.5.0/jszip",
        "pdfmake": "/plugins/pdfmake-0.1.36/pdfmake",
        "vfs_fonts": "/plugins/pdfmake-0.1.36/vfs_fonts",
        <!--按钮依赖-->
        "datatables.net-buttons": "/plugins/datatables.net/extensions/Buttons/js/dataTables.buttons",
        "buttons_flash": "/plugins/datatables.net/extensions/Buttons/js/buttons.flash",
        "buttons_html5": "/plugins/datatables.net/extensions/Buttons/js/buttons.html5",
        "buttons_print": "/plugins/datatables.net/extensions/Buttons/js/buttons.print",
        <!--日期格式化-->
        "moment": "/plugins/moment",
        <!--日期控件-->
        "timepicker": "/plugins/bootstrap-datepicker/js/bootstrap-datepicker",
        <!--树形控件-->
        "tree_view": "/plugins/bootstrap-treeview/bootstrap-treeview.min",
        <!--下拉框多选-->
        "select2": "/plugins/select2/js/select2.full.min",
        "typeahead": "/plugins/bootstrap-typeahead/bootstrap3-typeahead.min",

        <!--富文本编辑器-->
        "ckeditor": "/plugins/ckeditor/ckeditor",
        "wysihtml5": "/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5",

        //框架-自定义
        "notify": "/plugins/bootstrap-notify/bootstrap-notify.min",
        "hotkeys": "/plugins/hotkeys/hotkeys",
        //框架-自定义
        "wolf": "/frame/wolf",
        "base": "/frame/base",
        //工具类
        "validate": "/js/utils/validate",
        "utils": "/js/utils/utils",
        "utils_stored": "/js/utils/utils_stored",

        "Ajax": "/js/utils2/Ajax",
        "Array": "/js/utils2/Array",
        "Dataset": "/js/utils2/Dataset",
        "Number": "/js/utils2/Number",
        "String": "/js/utils2/String",
        "Utils": "/js/utils2/Utils",
        "Validator": "/js/utils2/Validator",

        //封装弹框类
        "notify_comm": "/js/common/bootstrap_notify_comm",
        "dataTables_comm": "/js/common/data_tables_comm",
        "hotkeys_comm": "/js/common/hotkeys_comm",

        /*********业务配置*********业务配置***********业务配置************业务配置***************/
        "sysUser": "/business/js/sysUser",
        "etl_define": "/business/js/etl_define",
        "etl_table": "/business/js/etl_table",
        "etl_transform_define": "/business/js/etl_transform_define",
        "etl_table_filter": "/business/js/etl_table_filter",
        "etl_datasource": "/business/js/etl_datasource",
        "etl_table_orderby": "/business/js/etl_table_orderby",
        "etl_table_rel": "/business/js/etl_table_rel",
        "etl_transform_rule": "/business/js/etl_transform_rule",
        "etl_transform_rule_type": "/business/js/etl_transform_rule_type",
        "login": "/business/js/login",
        "etl_error_log":"/business/js/etl_error_log",
        "etl_api":"/business/js/etl_api",
        "etl_function":"/business/js/etl_function",
        "etl_handler":"/business/js/etl_handler",
        "etl_instance":"/business/js/etl_instance",
        "etl_javascript":"/business/js/etl_javascript",
        "etl_javascript_category":"/business/js/etl_javascript_category",
        "etl_javascript_param":"/business/js/etl_javascript_param",
        "etl_rewrite_back":"/business/js/etl_rewrite_back",
        "etl_table_rel_rule":"/business/js/etl_table_rel_rule",
        "etl_task":"/business/js/etl_task",
        "etl_transform_field_type":"/business/js/etl_transform_field_type"
    },
    map: {
        "*": {
            "css": "/css"
        }
    },
    shim: {//定义模块之间的依赖关系
        "font-awesome": {// jquery-ui 需要引用到 jquery.js
            deps: ["jquery"]
        },
        "bootstrap": {
            deps: ["jquery"]
        },
        "fast_click": {
            deps: ["jquery"]
        },
        "admin_lte": {
            deps: ["jquery"]
        },
        "admin_lte_wolf": {
            deps: ["jquery"]
        },
        "select2": ["jquery"],
        "datatables.net": {
            deps: ["jquery"]
        },
        "datatables": {
            deps: ["jquery"]
        },
        "colresizable": {
            deps: ["jquery"]
        },
        "fixed_columns": {
            deps: ["jquery"]
        },
        "fixed_header": {
            deps: ["jquery"]
        },
        "colReorder": {
            deps: ["jquery"]
        },
        "select": {
            deps: ["jquery"]
        },
        "JSZip": {
            deps: ["jquery"]
        },
        "pdfmake": {
            deps: ["jquery"]
        },
        "vfs_fonts": {
            deps: ["jquery"]
        },
        "datatables.net-buttons": {
            deps: ["jquery"]
        },
        "buttons_flash": {
            deps: ["jquery"]
        },
        "buttons_html5": {
            deps: ["jquery"]
        },
        "buttons_print": {
            deps: ["jquery"]
        },
        "tree_view": {
            deps: ["jquery"]
        },
        "hotkeys": {
            deps: ["jquery"]
        },
        "notify": {
            deps: ["jquery"]
        },
        "base": ["jquery"],
        "validate": {
            deps: ["jquery"]
        },
        "utils": {
            deps: ["jquery"]
        },
        "utils_stored": {
            deps: ["jquery"],
            exports: 'com_dataset_dataset_tempstored'
        },
        "notify_comm": {
            deps: ["jquery"]
        },
        "dataTables_comm": {
            deps: ["jquery", "datatables.net-buttons", "buttons_flash", "buttons_html5", "buttons_print"]
        },
        "hotkeys_comm": {
            deps: ["jquery", "hotkeys"]
        }
    }

});
//基本框架加载
require(["jquery", "bootstrap", "fast_click", "admin_lte", "admin_lte_wolf", "html5shiv", "respond",
        "datatables.net", "datatables", "colresizable", "fixed_columns", "fixed_header", "colReorder",
        "select", "datatables.net-buttons", "JSZip", "pdfmake", "vfs_fonts", "buttons_flash", "buttons_html5", "buttons_print",
        "notify", "select2", "wysihtml5", "ckeditor", "moment", "timepicker"],
    function ($, bootstrap, fast_click, admin_lte, admin_lte_wolf, html5shiv, respond, datatablesNet, datatables,
              colresizable, fixed_columns, fixed_header, colReorder, select, datatablesbutton, jszip, pdfmake, vfs_fonts,
              buttons_flash, buttons_html5, buttons_print, notify, select2, wysihtml5, ckeditor, moment, timepicker) {

        $('.select2').select2();
        //Date picker
        $('.datepicker').datepicker({
            autoclose: true,
            format: 'yyyy-mm-dd'
            //startDate: '-3d'
        });

    });

//工具类
require(["jquery", "hotkeys", "base", "validate", "utils", "utils_stored", "notify_comm", "dataTables_comm", "hotkeys_comm",
        "Ajax", "Array", "Dataset", "Number", "String", "Utils", "Validator"],
    function ($, hotkeys, base, validate, utils, utils_stored, notify_comm, dataTables_comm, hotkeys_comm,
              Ajax, Array, Dataset, Number, String, Utils, Validator) {

        //快捷键初始化
        hotkeys.initialize();
        //自定义快捷键功能初始化
        hotkeys_comm.init();
        base.init();
    });

//业务
require(["jquery", "sysUser", "etl_define", "etl_table", "etl_transform_define", "etl_table_filter", "etl_datasource", "etl_table_orderby", "etl_table_rel",
        "etl_transform_rule", "etl_transform_rule_type", "login","etl_error_log","etl_api","etl_function","etl_handler","etl_instance",
    "etl_javascript","etl_javascript_category","etl_javascript_param","etl_rewrite_back","etl_table_rel_rule","etl_task","etl_transform_field_type"],
    function ($, sysUser, etlDefine, etlTable, etlTransformDefine, etlTableFilter, etlDatasource, etlTableOrderby, etlTableRel,
              etlTransformRule, etlTransformRuleType, login,etl_error_log,etl_api,etl_function,etl_handler,etl_instance,
              etl_javascript,etl_javascript_category,etl_javascript_param,etl_rewrite_back,etl_table_rel_rule,etl_task,etl_transform_field_type) {
        sysUser.init();
        etlDefine.init();
        etlTable.init();
        etlTransformDefine.init();
        etlTableFilter.init();
        etlDatasource.init();
        etlTableOrderby.init();
        etlTableRel.init();
        etlTransformRule.init();
        etlTransformRuleType.init();
        login.init();
        etl_error_log.init();

        etl_api.init();
        etl_function.init();
        etl_handler.init();
        etl_instance.init();
        etl_javascript.init();
        etl_javascript_category.init();
        etl_javascript_param.init();
        etl_rewrite_back.init();
        etl_table_rel_rule.init();
        etl_task.init();
        etl_transform_field_type.init();
    });

